/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.rbh.visanyee.entity;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author M
 */
@Entity
@Table(name = "patient")
@XmlRootElement
public class Patient implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "hos_guid", nullable = false, length = 38)
    private String hosGuid;
    @Column(name = "hn", length = 9)
    private String hn;
    @Column(name = "pname", length = 15)
    private String pname;
    @Column(name = "fname", length = 30)
    private String fname;
    @Column(name = "lname", length = 30)
    private String lname;

    public Patient() {
    }

    public Patient(String hosGuid) {
        this.hosGuid = hosGuid;
    }

    public String getHosGuid() {
        return hosGuid;
    }

    public void setHosGuid(String hosGuid) {
        this.hosGuid = hosGuid;
    }

    public String getHn() {
        return hn;
    }

    public void setHn(String hn) {
        this.hn = hn;
    }

    public String getPname() {
        return pname;
    }

    public void setPname(String pname) {
        this.pname = pname;
    }

    public String getFname() {
        return fname;
    }

    public void setFname(String fname) {
        this.fname = fname;
    }

    public String getLname() {
        return lname;
    }

    public void setLname(String lname) {
        this.lname = lname;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (hosGuid != null ? hosGuid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Patient)) {
            return false;
        }
        Patient other = (Patient) object;
        if ((this.hosGuid == null && other.hosGuid != null) || (this.hosGuid != null && !this.hosGuid.equals(other.hosGuid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.rbh.risk.entity.Patient[ hosGuid=" + hosGuid + " ]";
    }
}